home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / dejagnu.lha / dejagnu-1.0.1 / tcl / porting.notes < prev    next >
Text File  |  1993-02-14  |  6KB  |  178 lines

  1. This file contains a collection of notes that various people have
  2. provided about porting Tcl to various machines and operating systems.
  3. I don't have personal access to any of these machines, so I make
  4. no guarantees that the notes are correct, complete, or up-to-date.
  5. In some cases, a person has volunteered to act as a contact point
  6. for questions about porting Tcl to a particular machine;  in these
  7. cases the person's name and e-mail address are listed.
  8.  
  9. ---------------------------------------------
  10. Cray machines running UNICOS:
  11. Contact: John Freeman (jlf@cray.com)
  12. ---------------------------------------------
  13.  
  14. 1. The nm command on unicos doesn't have a -p option, so I removed it
  15. from the config script without apparent harm.
  16.  
  17. diff -c -r1.1 config
  18. *** 1.1    1991/11/12 15:11:51
  19. --- config    1991/11/12 15:14:18
  20. ***************
  21. *** 57,63 ****
  22.       echo "  to set the libc variable."
  23.       exit(1)
  24.   endif
  25. ! nm -p $libc > tmp.libc
  26.   if ( $status != 0 ) then
  27.       echo "- ERROR\!\!  Nm failed to extract names of system-supplied library"
  28.       echo "  procedures from $libc.  You'll have to modify config by hand to"
  29. --- 57,63 ----
  30.       echo "  to set the libc variable."
  31.       exit(1)
  32.   endif
  33. ! nm $libc > tmp.libc
  34.   if ( $status != 0 ) then
  35.       echo "- ERROR\!\!  Nm failed to extract names of system-supplied library"
  36.       echo "  procedures from $libc.  You'll have to modify config by hand to"
  37.  
  38. 2. There is an error in the strstr function in UNICOS such that if the
  39. string to be searched is empty (""), the search will continue past the
  40. end of the string.  Because of this, the history substitution loop
  41. will sometimes run past the end of its target string and trash
  42. malloc's free list, resulting in a core dump some time later.  (As you
  43. can probably guess, this took a while to diagnose.)  I've submitted a
  44. problem report to the C library maintainers, but in the meantime here
  45. is a workaround.
  46.  
  47. -----------------------------------------------------------------
  48. diff -c1 -r1.1 tclHistory.c
  49. *** 1.1    1991/11/12 16:01:58
  50. --- tclHistory.c    1991/11/12 16:14:22
  51. ***************
  52. *** 23,24 ****
  53. --- 23,29 ----
  54.   #include "tclInt.h"
  55. + #ifdef _CRAY
  56. + /* There is a bug in strstr in UNICOS; this works around it. */
  57. + #define strstr(s1,s2) ((s1)?(*(s1)?strstr((s1),(s2)):0):0)
  58. + #endif _CRAY
  59.  
  60.  
  61. ---------------------------------------------
  62. HP-UX systems:
  63. ---------------------------------------------
  64.  
  65. (The comments below are leftover from older versions of Tcl and
  66. older versions of HP software;  the current versions shouldn't
  67. require any changes at all.)
  68.  
  69. 1. The #define for TCL_UNION_WAIT in tclUnix.h needs to be set to 0,
  70. not 1.  I've tried a number of techniques to get the "config" script
  71. to figure this out and set it correctly, but so far I haven't been
  72. able to make it work for HP-UX systems.
  73.  
  74. 2. It may also be useful to add the flag "-D_BSD" to CFLAGS in the
  75. Makefile, but I'm not sure this is necessary (and it may even be
  76. evil) if TCL_UNION_WAIT has been #define'd correctly.
  77.  
  78. ---------------------------------------------
  79. MIPS systems runing EP/IX:
  80. ---------------------------------------------
  81.  
  82. 1. Need to add a line "#include <bsd/sys/time.h>" in tclUnix.h.
  83.  
  84. 2. Need to add "-lbsd" into the line that makes tclTest:
  85.  
  86.     ${CC} ${CFLAGS} tclTest.o libtcl.a -lbsd -o tclTest
  87.  
  88. ---------------------------------------------
  89. IBM RS/6000 systems running AIX:
  90. ---------------------------------------------
  91.  
  92. 1. The system version of strtoul is buggy, at least under some
  93. versions of AIX.  If the expression tests fail, try forcing Tcl
  94. to use its own version of strtoul instead of the system version.
  95. To do this, first copy strtoul.c from the compat subdirectory up
  96. to the main Tcl directory.  Then modify the Makefile so that
  97. the definition for COMPAT_OBJS includes "strtoul.o".  Note:  the
  98. "config" script should now detect the buggy strtoul and substitute
  99. Tcl's version automatically.
  100.  
  101. 2. You may have to comment out the declaration of open in tclUnix.h.
  102.  
  103. 3. You may need to add "-D_BSD -lbsd" to the CFLAGS definition.  This
  104. causes the system include files to look like BSD include files and
  105. causes C library routines to act like bsd library routines.  Without
  106. this, the system may choke on "struct wait".
  107.  
  108. ---------------------------------------------
  109. AT&T 4.03 OS:
  110. ---------------------------------------------
  111.  
  112. Machine: i386/33Mhz i387 32k Cache 16MByte 
  113. OS: AT&T SYSV Release 4 Version 3
  114. X: X11R5 fixlevel 9
  115. Xserver: X386 1.2
  116.  
  117. 1. Change the Tk Makefile as follows:
  118. XLIB            = -lX11
  119.     should be changed to:
  120. XLIB            = -lX11 -lsocket -lnsl
  121.  
  122. 2. Change the Tcl "config" script as follows:
  123. set libc="/lib/libc.a"
  124.     should be changed to:
  125. set libc="/usr/ccs/lib/libc.a"
  126.  
  127. -------------------------------------------------------
  128. Motorola MPC's running UNIX System V/88 Release R32V2:
  129. -------------------------------------------------------
  130.  
  131. 1.  Tcl should build without any modifications to sources, but csh
  132. isn't supplied with the operating system so you'll have to find and
  133. use the public-domain tcsh.
  134.  
  135. -------------------------------------------------------
  136. Silicon Graphics systems:
  137. -------------------------------------------------------
  138.  
  139. 1. In tcl/tclUnix.h, add the following around the fseek and lseek declarations:
  140.  
  141. #if !defined(__sgi)
  142. #endif
  143.  
  144. 2. Append -ansiposix to the CC variable in the Makefile. The compiler,
  145.    by default, is ANSI C with extensions, but doesn't define __STDC__ to obey
  146.    a strict reading of the ANSI standard. -ansiposix disables the extensions
  147.    and defines __STDC__.
  148.  
  149. 3. Comment out the ranlib line in the Makefile.
  150.  
  151. ---------------------------------------------
  152. NeXT machines running NeXTStep 2.1:
  153. ---------------------------------------------
  154.  
  155. 1. Change the "libc" definition in the config file to
  156.     set libc="/lib/libsys_s.a"
  157.  
  158. 2. Several of the "format" and "scan" tests will fail, but these are
  159. all minor nits stemming from imperfect POSIX compliance in the NeXT
  160. C library procedures.  The errors are unlikely to affect any Tcl
  161. applications.
  162.  
  163. -------------------------------------------------
  164. ISC 2.2 UNIX (using standard ATT SYSV compiler):
  165. -------------------------------------------------
  166.  
  167. In Makefile, change
  168.  
  169. CFLAGS =      -g -I. -DTCL_LIBRARY=\"${TCL_LIBRARY}\"
  170.  
  171. to
  172.  
  173. CFLAGS =      -g -I. -DPOSIX_JC -DTCL_LIBRARY=\"${TCL_LIBRARY}\"
  174.  
  175. This brings in the typedef for pid_t, which is needed for
  176. /usr/include/sys/wait.h in tclUnix.h.
  177.